<template>
  <h3>{{ itbaizhan.name }}</h3>
  <p>{{ itbaizhanContent }}</p>
  <p>{{ itbaizhanContents() }}</p>
</template>

<script>

export default {
  data() {
    return {
      itbaizhan: {
        name: "百战程序员"
        , content: ['前端', 'java', 'python']
      }
    }
  }
  // 计算属性
  , computed: {
    itbaizhanContent() {
      return this.itbaizhan.content.length > 5 ? "Yes" : "No"
    }
  }
  // 放函数 或 方法
  , methods: {
    itbaizhanContents() {
      return this.itbaizhan.content.length > 5 ? "Yes" : "No"
    }
  }
}
</script>